<template>
	<view v-if="showhead">
		<!-- 标题 -->
		<view v-if="headerTitle" class="p-2 border-bottom main-border-color">
			<slot name="title">
				<text class="font-md font-weight">{{ headerTitle }}</text>
			</slot>
		</view>
		<!-- body -->
		<view class="">
			<image v-if="bodyCover" :src="bodyCover" mode="widthFix"><slot></slot></image>
		</view>
	</view>
</template>

<script>
export default {
	props: {
		headerTitle: String, //头部标题
		bodyCover: String, // 封面图
		showhead: {
			type: Boolean,
			default: true
		}
	},

	data() {
		return {};
	},
	methods: {
		event(obj) {
			console.log('点击了图标 obj = ', obj);
		}
	}
};
</script>

<style></style>
